package svc

import (
	"changes/api/internal/config"
	"changes/changesrpc/changesrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config     config.Config
	ChangesRpc changesrpcclient.Changesrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:     c,
		ChangesRpc: changesrpcclient.NewChangesrpc(zrpc.MustNewClient(c.ChangesRpc)),
	}
}
